<template lang="html">
  <div class="m-search">
    <ul>
      <li @click="showCityList">
        <span>{{cityName || '全部'}}</span><i class="yo-ico">&#xf032;</i>
      </li>
      <li>
        <input type="text" placeholder="搜索职位或公司" />
      </li>
      <li class="yo-ico">&#xf067;</li>
    </ul>
    <div class="custominfo">
      将搜索地区和关键词设为定制条件
    </div>
    <position-list></position-list>
  </div>
</template>

<script>
import PositionList from '../components/PositionList.vue'
export default {
  data() {
    return {
      cityName: ''
    }
  },
  components: {
    PositionList
  },
  methods: {
    showCityList() {
      this.$router.push('/city')
    }
  },
  mounted() {
    this.cityName = this.$route.query.cityName
    this.$store.commit('changeIndex', 1)
  }
}
</script>
